#pragma once
#include "base/Control.h"


class ConnectLine : public Control
{
public:
    ConnectLine() {}

    void ParseXmlElement(class TiXmlElement* ele);
    bool SetAttribute(const char* attrName, const char* attrVal);
    void OnDraw();

    virtual void onMouseButtonDown(int button, int x, int y);
    BlueprintScriptLibrary::Class* GetClass();
    void Connect(class GraphNode* cg0,GraphNode* cg1);
    void ConnectToGraphBase(class GraphBase* cg0, GraphBase* cg1);
    Vec2vbi p1;
    Vec2vbi p2;
    Vec2vbi baseOffset;;
    GraphNode* g0;
    GraphNode* g1;
    GraphBase* gb0;
    GraphBase* gb1;
    class InputPin* ip{nullptr};
    class OutputPin* op{ nullptr };

    VarBaseInt g0PinIndex{0};
    VarBaseInt g1PinIndex{0};
    bool NeedDebugDraw{ false};
    bool bVisible{ false };
};
RegisterBlueprintClass(ConnectLine)